<?php
/**
 * Widget for displaying content of three categories (triple widget) on home page
 *
 * Used for both single and index/archive/search.
 *
 * @package WordPress
 * @subpackage lebanontimes
 * @since Lebanon Times 1.0
 */

include dirname(__FILE__)."/categoryMapping.php";
?>

<div class="tripleWidget">
    <div style="background-color: #FFF; width: 100%; height: 45px; clear: both;">
        <div class="tabRight tabActive" rel="content1">
            <?php echo get_the_category_by_ID( $categoryMapping['lebanon'][0] );?>
        </div>
        <div class="tabCenter tab" rel="content2">
            <?php echo get_the_category_by_ID( $categoryMapping['arab'][0] );?>
        </div>
        <div class="tabLeft tab" rel="content3">
            <?php echo get_the_category_by_ID( $categoryMapping['world'][0] );?>
        </div>
    </div>
    <div class="contentRight content">
        <ul>
            <?php $posts = get_posts("category={$categoryMapping['lebanon'][0]}&numberposts=0");
                foreach($posts as $post) { ?>
                <li><label><?php the_time('H:i');?></label><a href="<?php the_permalink() ?>" target="_parent"><?php the_title(); ?></a></li>
            <?php } ?>
        </ul>
    </div>
    <div class="contentCenter content" style="display: none;">
        <ul>
            <?php $posts = get_posts("category={$categoryMapping['arab'][0]}&numberposts=0");
                foreach($posts as $post) { ?>
                <li><label><?php the_time('H:i');?></label><a href="<?php the_permalink() ?>" target="_parent"><?php the_title(); ?></a></li>
            <?php } ?>
        </ul>
    </div>
    <div class="contentLeft content" style="display: none;">
        <ul>
            <?php $posts = get_posts("category={$categoryMapping['world'][0]}&numberposts=0");
                foreach($posts as $post) { ?>
                <li><label><?php the_time('H:i');?></label><a href="<?php the_permalink() ?>" target="_parent"><?php the_title(); ?></a></li>
            <?php } ?>
        </ul>
    </div>
    <div class="footer footerRight">
        <div class="readMore"><a href="<?php echo get_category_link( $categoryMapping['lebanon'][0] );?>">إقرأ المزيد</a> <div class="arrow-left"></div></div>
    </div>
    <div class="footer footerCenter" style="display: none;">
        <div class="readMore"><a href="<?php echo get_category_link( $categoryMapping['arab'][0] );?>">إقرأ المزيد</a> <div class="arrow-left"></div></div>
    </div>
    <div class="footer footerLeft" style="display: none;">
        <div class="readMore"><a href="<?php echo get_category_link( $categoryMapping['world'][0] );?>">إقرأ المزيد</a> <div class="arrow-left"></div></div>
    </div>
</div>